import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const sqlBatchResultView = await client.axons.sql.batch('id', { statements: [{ sql: 'sql' }] });
console.log(sqlBatchResultView.results);{
"results": [
{
"success": {
"columns": [
{
"name": "<string>",
"type": "<string>"
}
],
"rows": [
{}
],
"meta": {
"duration_ms": 123,
"changes": 123,
"rows_read_limit_reached": true
}
},
"error": {
"message": "<string>"
}
}
]
}[Beta] Execute multiple SQL statements atomically within a single transaction against an axon’s SQLite database.
import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const sqlBatchResultView = await client.axons.sql.batch('id', { statements: [{ sql: 'sql' }] });
console.log(sqlBatchResultView.results);{
"results": [
{
"success": {
"columns": [
{
"name": "<string>",
"type": "<string>"
}
],
"rows": [
{}
],
"meta": {
"duration_ms": 123,
"changes": 123,
"rows_read_limit_reached": true
}
},
"error": {
"message": "<string>"
}
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The axon identifier.
The SQL statements to execute atomically within a transaction.
Show child attributes
OK
One result per statement, in order.
Show child attributes
Was this page helpful?